<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="ajax/http.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script src="http://unpkg.com/axios/dist/axios.min.js"></script>
    <style>
        *{margin: 0;padding: 0;}
        .app{width: 750px;margin-left: auto;margin-right: auto;}
        .item{display: flex;width: 720px;margin-left: auto;margin-right: auto;margin-top: 20px;}
        .item img{width: 150px;height: 150px;}
        .item a{color: #333;text-decoration: none;font-size: 14px;margin-top: 5px;}
        .item p{font-size: 14px;color: #333;margin-top: 5px;}
        .item span{font-size: 14px;color: #333;margin-top: 5px;}
        .dk{display: flex;margin-top: 20px;}
        .jk{margin-left: 20px;margin-top: 40px;}
    </style>
</head>
<body>
    <div class="app">
        <!-- <div class="item">
            <img src="https://img2.doubanio.com/view/photo/s_ratio_poster/public/p480747492.jpg">
            <div class="jk">
                <a>肖申克的救赎</a>
                <p>9.7</p>
                <p>希望让人自由。</p>
                <p>2201239</p>
                <span class="dk"><p>1994/</p><p>美国/</p><p>"犯罪 剧情</p></span>
            </div>
        </div> -->
    </div>
    <script>
        axios({
            baseURL:"http://192.168.4.18:8000",
            method:"get",
        }).then(res=>{
            console.log(res)
            var arr=res.data.result;
            arr.forEach((item,index)=>{
                var {pic,title,raiting,slogo,labels}=item;
                var sum=labels.join("/");
                console.log(sum)
                console.log(arr)
                var htmlItem=`
                    <div class="item">
                        <img src=${pic} alt="">
                        <div class="jk">
                            <a>${title}</a>
                            <p>${raiting}</p>
                            <p>${slogo}</p>
                            <span class="dk"><p>${sum}</p></span>
                        </div>
                    </div
                `
                $(".app").append(htmlItem);
            })
        })
    </script>
</body>
</html>